<?php echo $header; ?>

<?php echo $column_left; ?>
<!--Start Middle Panel-->

<script type="text/javascript">
function gotopage(){
   <?php //$this->session->data['refer_friend_link']=$_SERVER['HTTP_REFERER'];?>
         document.location.href ='<?php echo $Refer_friend;?>';
}    
</script>
<div class="container608 ft_lt">
    
    <!--Start Product ShowCase-->
    <div class="main-content-container container608">
        <!--Start Product List Detail-->
        <div class="Content-containerNopadding">
            <!--Start Grid Header-->
            <div class="gray-BKheading-container43 height35 paddingT8">
                <!--Start Send Email-->
                <div class="grid-action-nav">
                    <ul>
                        <li onclick="return gotopage();"><a href="javascript:void(0);" >Send Email to Refer this Site</a></li>
                    </ul>
                    
                </div>
                <!--End Send Email-->
                
                       
                <!--Start Filter-->
                <div class="ft_rt  paddingR15">
                   <!-- <div class="sort"><b><?php echo $text_sort; ?></b>Filter Choose </div>
                    -->
                            <select onchange="location = this.value;" class="selectW160H25P3">
                                 <?php foreach ($sorts as $sorts) { ?>
                                    <?php if ($sorts['value'] == $sort . '-' . $order) { ?>
                                        <option value="<?php echo $sorts['href']; ?>" selected="selected"><?php echo $sorts['text']; ?></option>
                                    <?php } else { ?>
                                        <option value="<?php echo $sorts['href']; ?>"><?php echo $sorts['text']; ?></option>
                                    <?php } ?>
                                <?php } ?>
                            </select>
                        
                   
                </div>
                <!--End Filter--> 
                
                <div class="display" style="padding-left: 280px; padding-top: 3px; "><b> List: </b><img src="<?php echo $InctiveList; ?>" /> <b> Grid: </b> <a onclick="display('grid');"><img src="<?php echo $ActiveGrid; ?>" /></a></div>
               
            </div>
            <!--End Grid Header-->

            <!--Start List Container-->
            <div class="container568 paddingTB10 paddingLR20">
                <?php //echo $content_top; ?>
                <div class="breadcrumb">
                    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
                        <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
                    <?php } ?>
                </div>
                <h1><?php echo $heading_title; ?></h1>
                <ul class="productList"></ul> 
                <?php /*if ($thumb || $description) { ?>
                    <div class="category-info">
                        <?php if ($thumb) { ?>
                            <div class="image"><img src="<?php echo $thumb; ?>" alt="<?php echo $heading_title; ?>" /></div>
                        <?php } ?>
                        <?php if ($description) { ?>
                            <?php echo $description; ?>
                        <?php } ?>
                    </div>
                <?php }*/ ?><br />
                <?php if ($categories) { ?>
                    <h2><?php echo $text_refine; ?></h2>
                    <div class="category-list">
                        <?php if (count($categories) <= 5) { ?>
                            <ul>
                                <?php foreach ($categories as $category) { ?>
                                    <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li>
                                <?php } ?>
                            </ul>
                        <?php } else { ?>
                            <?php for ($i = 0; $i < count($categories);) { ?>
                                <ul>
                                    <?php $j = $i + ceil(count($categories) / 4); ?>
                                    <?php for (; $i < $j; $i++) { ?>
                                        <?php if (isset($categories[$i])) { ?>
                                            <li><a href="<?php echo $categories[$i]['href']; ?>"><?php echo $categories[$i]['name']; ?></a></li>
                                        <?php } ?>
                                    <?php } ?>
                                </ul>
                            <?php } ?>
                        <?php } ?>
                    </div>
                <?php } ?>
                <?php if ($products) { ?>
                    <!--<div class="product-filter">
                        <div class="display"><b><?php echo $text_display; ?></b> <?php echo $text_list; ?> <b>/</b> <a onclick="display('grid');"><?php echo $text_grid; ?></a></div>
                        
                        
                    </div> -->
                   <!-- <div class="product-compare"><a href="<?php //echo $compare; ?>" id="compare_total"><?php //echo $text_compare; ?></a></div> -->
                    <div class="product-list">
                        	
                        <?php foreach ($products as $product) { ?>
                            <div>
                                <?php if ($product['thumb']) { ?>
                                    <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
                                <?php } ?>
                                <div class="name productNameContainer"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
                                <div class="description"><?php echo $product['description']; ?></div>
                                <?php if ($product['price']) { ?>
                                    <div class="price priceContainer clearfix">
                                        
                                    <span class="product_price">
                                        <?php if (!$product['special']) { ?>
                                            <?php echo $product['price']; ?>
                                        <?php } else { ?>
                                            <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
                                        <?php } ?>
                                        <?php if ($product['tax']) { ?>
                                            <br />
                                            <span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span>
                                        <?php } ?>
                                            </span>
                                  
                                    </div>
                                <?php } ?>
                                <?php if ($product['rating']) { ?>
                                    <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
                                <?php } ?>
                                 <div class="compare productActionContainer clearfix"><a onclick="addToCompareOncat('<?php echo $product['product_id']; ?>','new');"  class="compare ft_rt marginB5 clear"><?php echo $button_compare; ?></a></div>
                                 <div class="cart productActionContainer clearfix"><p class="productActionContainer clearfix"><a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button addCart ft_rt clear"><span><?php echo $button_cart; ?></span></a></p></div>
                               <div class="wishlist productActionContainer clearfix"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');" class="add_wishlist ft_rt marginB5 clear"><?php echo $button_wishlist; ?></a></div>
                               
                            </div>
                        <?php } ?>
                    </div>
                    <div class="pagination"><?php //echo $pagination; ?></div>
                <?php } ?>
                <?php if (!$categories && !$products) { ?>
                    <div class="content"><?php echo $text_empty; ?></div>
                    <div class="buttons">
                        <div class="right"><a href="<?php echo $continue; ?>" class="button"><span><?php echo $button_continue; ?></span></a></div>
                    </div>
                <?php } ?>
                <?php echo $content_bottom; ?>
                <div class="clear"></div>
            </div>
            <!--End List Container-->
            <!--Start Grid Footer-->
            <div class="gray-BKFooter-container43 height35 paddingT8">
                <!--Start Page Navigation-->    
                <div class="grid-pagination-nav">
                    <?php echo $pagination; ?>
                  
                </div>
                <!--End Page Navigation-->
                <!--Start Product Number-->
                <div class="grid-contact-per-container">
                    <span class="gry-hdg marginR10">Contacts per page:</span><select onchange="location = this.value;">
                                <?php foreach ($limits as $limits) { ?>
                                    <?php if ($limits['value'] == $limit) { ?>
                                        <option value="<?php echo $limits['href']; ?>" selected="selected"><?php echo $limits['text']; ?></option>
                                    <?php } else { ?>
                                        <option value="<?php echo $limits['href']; ?>"><?php echo $limits['text']; ?></option>
                                    <?php } ?>
                                <?php } ?>
                            </select>
                </div>
                <!--End Product Number-->
            </div>
            <!--End Grid Footer-->

        </div>
        <!--Start Product List Detail-->
    </div>
    <!--End Product ShowCase-->
</div>
<!--End Middle Panel-->
   <div class="container176 ft_lt">
<?php echo $column_compare;
echo $column_findgift; ?>
   </div>
<script type="text/javascript"><!--
    function display(view) {
        if (view == 'list') {
            $('.product-grid').attr('class', 'product-list');
		
            $('.product-list > div').each(function(index, element) {
                html  = '<div class="right">';
                html += '  <div class="compare">' + $(element).find('.compare').html() + '</div>';
                
                html += '  <div class="cart">' + $(element).find('.cart').html() + '</div>';
                html += '  <div class="wishlist">' + $(element).find('.wishlist').html() + '</div>';
                html += '</div>';			
			
                html += '<div class="left">';
			
                var image = $(element).find('.image').html();
			
                if (image != null) { 
                    html += '<div class="image">' + image + '</div>';
                }
			
                var price = $(element).find('.price').html();
			
                if (price != null) {
                    html += '<div class="price">' + price  + '</div>';
                }
					
                html += '  <div class="name productNameContainer">' + $(element).find('.name').html() + '</div>';
                html += '  <div class="description">' + $(element).find('.description').html() + '</div>';
			
                var rating = $(element).find('.rating').html();
			
                if (rating != null) {
                    html += '<div class="rating">' + rating + '</div>';
                }
				
                html += '</div>';

						
                $(element).html(html);
            });		
		
            $('.display').html('<b> List: </b><img src="<?php echo $InctiveList; ?>" /> <b> Grid: </b> <a onclick="display(\'grid\');"><img src="<?php echo $ActiveGrid; ?>" /> </a>');
		
            $.cookie('display', 'list'); 
        } else {
            $('.product-list').attr('class', 'product-grid');
		
            $('.product-grid > div').each(function(index, element) {
                html = '';
			
                var image = $(element).find('.image').html();
			
                if (image != null) {
                    html += '<div class="image">' + image + '</div>';
                }
			
                html += '<div class="name productNameContainer">' + $(element).find('.name').html() + '</div>';
                html += '<div class="description">' + $(element).find('.description').html() + '</div>';
			
                var price = $(element).find('.price').html();
			
                if (price != null) {
                    html += '<div class="price priceContainer clearfix"><spanclass="product_price" > ' + price  + '</span></div>';
                }
			
                var rating = $(element).find('.rating').html();
			
                if (rating != null) {
                    html += '<div class="rating">' + rating + '</div>';
                }
		
                  html += '<div class="compare productActionContainer clearfix">' + $(element).find('.compare').html() + '</div>';
		
                html += '<div class="cart productActionContainer clearfix">' + $(element).find('.cart').html() + '</div>';
                html += '<div class="wishlist productActionContainer clearfix">' + $(element).find('.wishlist').html() + '</div>';
              	
                $(element).html(html);
            });	
					
            $('.display').html('<b> List: </b> <a onclick="display(\'list\');"><img src="<?php echo $ActiveList; ?>" /> </a> <b> Grid: </b> <img src="<?php echo $InctiveGrid; ?>" /> ');
		
            $.cookie('display', 'grid');
        }
    }

    view = $.cookie('display');

    if (view) {
        display(view);
    } else {
        display('grid');
    }
    //--></script> 
<?php echo $footer; ?>